home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / DeveloperStax.cpt / Developer Stack 1.1 / card_5796.txt < prev    next >
Text File  |  1989-02-26  |  3KB  |  121 lines

  1. -- card: 5796 from stack: in.1
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 2612
  5. -- name: ModResCopy
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A003
  11. -- rect: left=82 top=302 right=324 bottom=182
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Install
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   if the optionkey is down then pass mouseup
  23.   put installres(XCMD,ModResCopy) into it
  24.   if it is empty then play boing
  25.   else answer it
  26. end mouseUp
  27.  
  28.  
  29.  
  30. -- part 2 (button)
  31. -- low flags: 00
  32. -- high flags: A004
  33. -- rect: left=223 top=243 right=293 bottom=282
  34. -- title width / last selected line: 0
  35. -- icon id / first selected line: 27056 / 27056
  36. -- text alignment: 1
  37. -- font id: 0
  38. -- text size: 12
  39. -- style flags: 0
  40. -- line height: 16
  41. -- part name: Try It
  42. ----- HyperTalk script -----
  43. on mouseUp
  44.   if the optionkey is down then pass mouseup
  45.  
  46.   put "Please select the source stack"
  47.   set cursor to 4
  48.   put filename("STAK") into source
  49.   if source is empty then
  50.     play oops
  51.     hide message window
  52.     exit mouseUp
  53.   end if
  54.  
  55.   ask "What is the resource type?"
  56.   if it is empty then
  57.     play oops
  58.     hide message window
  59.     exit mouseup
  60.   end if
  61.   put quote&it"e into ResType
  62.  
  63.   ask "What is the resource name?"
  64.   if it is empty then
  65.     play oops
  66.     hide message window
  67.     exit mouseup
  68.   end if
  69.   put quote&it"e into ResName
  70.  
  71.   put "Please select a destination stack"
  72.   put filename("STAK") into destination
  73.   if destination is empty then
  74.     play oops
  75.     hide message window
  76.     exit mouseUp
  77.   end if
  78.  
  79.   ModResCopy source,destination,ResType,ResName
  80.  
  81. end mouseUp
  82.  
  83.  
  84.  
  85. -- part contents for background part 2
  86. ----- text -----
  87. ModResCopy
  88.  
  89. -- part contents for background part 13
  90. ----- text -----
  91. 4
  92.  
  93. -- part contents for background part 3
  94. ----- text -----
  95.  
  96. This will copy a resource from one file into another file.
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103. Thanks to:
  104. ? (If anyone knows who wrote this please pass the information on so proper credit can be given.)
  105.  
  106.  
  107. -- part contents for background part 10
  108. ----- text -----
  109. Syntax:
  110.  
  111. ModResCopy <sourceFile>,
  112. <destinationFile>,"ResourceType",
  113. "ResourceName"
  114.  
  115. <sourceFile> is the name of the file the resource will be copied from.
  116. <destinationFile> is the name of the file the resource will be copied to.
  117. "ResourceType" is the 'type' identification of the resource.
  118. "ResourceName" is (suprise) the name of the resource to be copied.  
  119.  
  120. If "Error" is returned to the result, then there was a problem copying the resource.
  121.